<html>
<head>
    <meta charset="UTF-8">
    <title>投参吉林“吉林·长白山人参”招商引资平台</title>
    <meta name="viewport" content="initial-scale=1,maximum-scale=1, minimum-scale=1">
    <script src="js/jquery.js"></script>

    <script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
<script src="http://h5.jlrbyy.cn/wxjson/js/wx-rs.js?v=1.03"  type="text/javascript"></script> 
<link rel="stylesheet" type="text/css" href="css/base.css?v=1.8">
<link rel="stylesheet" type="text/css" href="css/style.css?v=1.8">
    <link rel="stylesheet" href="swiper/swiper-bundle.min.css" />
    <script type="text/javascript">
        document.documentElement.style.fontSize = document.documentElement.clientWidth / 750*100 + 'px';
    </script>
</head>
<body>
<div class="container">
    <div class="header">
        <div class="header_top">
            <img src="./images/logo.png" id="logo" alt="">
            <img src="./images/logo1.png"  id="logo1" alt="">
        </div>
    </div>
    <div class="content" style="margin-top: -0.1rem">
        <ul id="content">
        </ul>
    </div>
    <div class="footer">
        <div>吉林省推动人参产业高质量发展工作专班指导</div>
        <div>吉林日报社主办&nbsp;&nbsp;&nbsp;&nbsp;吉报传媒运营</div>
        <div>联系我们： （0431） 88600998</div>
    </div>
</div>


</body>
<script>
    function getUrlParam(name) {
        const urlParams = new URLSearchParams(window.location.search);
        return urlParams.get(name);
    }

    var search=decodeURIComponent(getUrlParam('search'))
    console.log(search)

    getnewslist(search)
    function getnewslist(search){
        $.ajax({
            url: 'https://www.cailianxinwen.com/app/notice/getNewsListByFilterContent?filterContent='+search,
            dataType: "json",
            //jsonp: "jsoncallback",
            success: function (json) {
                console.log(json)
                if(json.totalRow==0)
                {
                    var screenHeight = window.innerHeight;

                    // 打印到控制台
                    console.log('屏幕高度为：' + screenHeight + '像素');
                    $('body').height(screenHeight)
                }
                // 获取视口高度

                let _html=''
                $.each(json, function(index, value){

                    if(value.titleimg!=null){
                        _html+=`
                        <a href="item.html?id=${value.id}">
                                  <li class="news-pic">
                                    <img src="${value.titleimg}" alt=""/>
                                  <div>
                                    <span class="title">${value.title}</span>
                                    <span class="time">${value.posttime}</span>
                                  </div>
                                </li>
                        </a>
`
                    }
                    else
                    {
                        _html+=`
                            <a href="item.html?id=${value.id}">
                                    <li class="news">
                                    <span class="title">${value.title}</span>
                                          <span class="time">${value.posttime}</span>
                                    </li>
                                    </a>
                              `
                    }
                    $('#content').html(_html)
                })

            },

        });



    }
</script>
</html>